<?php
$q=$_GET["q"];
$array= explode(",",$q);
$sub=$array[0];
$School_Id=$array[1];
$Access_Type=$array[2];
$Id=$Access_Type.",".$School_Id.",School_Id";
$hint="";
include_once '../Login/databaseconnection.php';
if($sub!="Select One"&&$School_Id!="")
{
$tot_tea=mysql_query("SELECT COUNT(T_NIC_Number) AS tot_teachers FROM teacher WHERE Appointed_Subject='$sub' AND School_Id='$School_Id'");
if($tot_tea)
{
if($row_tea=mysql_fetch_array($tot_tea))
{
$App_Teachers=$row_tea['tot_teachers'];
}
else
{
$App_Teachers='0';
}
}
if($App_Teachers!="0")
{
$hint=$hint."<input type='text' name='No_Appo_Teachers' value='$App_Teachers' readonly='readonly' id='$Id' onmouseover='getdetails_popup(this.name,this.id)'/>";
}
else
{
$hint="<input type='text' name='No_Appo_Teachers' value='$App_Teachers' readonly='readonly' onmouseover='clearpopbox()'/>";
}
}
if($hint=="")
{
$response="<input type='text' name='No_Appo_Teachers' readonly='readonly'/>";
}
else
{
$response=$hint;
}
echo $response;
?>